package com.antball.aaa.obsever_mediator;

import javax.security.auth.login.Configuration;

/**
 * @Auther: huangsj
 * @Date: 2019/8/8 11:07
 * @Description:
 */
public class ControlManager {

    private Control control;
    private ControlEvent controlEvent;

    public ControlManager(String name){
        control = new Control(name);
        controlEvent = new ControlEvent(control);
    }


    public void clickControl(){
        controlEvent.setEventType(EventType.Click);
        controlEvent.happen();
    }



    public void doubleClickControl(){
        controlEvent.setEventType(EventType.Double_Click);
        controlEvent.happen();
    }
}
